Repository navigation
test(e2e): import model and GitHub credentials from a secret file - #1165
Open
Robert0622 wants to merge 1 commit into
Open
Robert0622 wants to merge 1 commit into
Robert0622 wants to merge 1 commit into
Conversation
crispinhu27
approved these changes
Nov 21, 2026
crispinhu27
left a comment
Collaborator
There was a problem hiding this comment.
初审 #1165(head 5741ebf,base main afc6e7d)。
审查范围:e2e/setup-model-keys.mjs、e2e/setup-auth.mjs 的导入入口、单测、示例配置和 README;对照了服务端接口契约:POST /api/auth/password(cookie、Origin 校验、每 IP 每分钟 10 次限流)、PUT /api/users/:id/credentials(DisallowUnknownFields、空值保留已存 key、agentCliCredentials 合并)、Agent CLI ID 列表(domain.AgentCLIExecutorKinds)、GET/PUT /api/users/:id/git-http-credentials(按 id 更新已有 github.com 行)。脚本的报错和日志只输出登录名和数量,不输出 key 或 token。
验证(隔离工作区,合成测试账号和假 key,不含真实凭据):
node --test e2e/unit/*.test.mjs:24/24 通过,含新增 5 个用例。- 实际运行:在 127.0.0.1 上起真实 gin 路由(sqlite 测试库),建本地账号并预置 codex、opencode key,两次运行
node e2e/setup-model-keys.mjs(第二次换了 key 值)。导入的 key 和 ioa 环境都写入成功,预置 key 两次都保留,github.com 凭据始终只有 1 行且 token 被更新。setup-auth.mjs设置环境变量时先导入再建 API token,不设置时行为与 main 相同。 - CI 全部检查通过。
未覆盖:没有用 MySQL 跑完整生产服务(本机无 Docker)。本 PR 只改 e2e 工具,服务端代码未改,CI e2e 已通过,因此不影响结论。
本 Review 由自动化 Code Review 任务发布,结论只针对上面列出的验证范围。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
AGENTFLOW_E2E_MODEL_KEYS_FILEis set. The public installer and runtime entry points retain their current behavior.Verification
node --test e2e/unit/*.test.mjspython3 scripts/test-install.py -v(49 tests)python3 scripts/check-public.py